﻿using System.Threading.Tasks;

namespace Shared.Service.DataPermissions
{
    /// <summary>
    /// 数据范围解析
    /// </summary>
    public interface IDataPermissionParser
    {
        /// <summary>
        /// 获取门店数据范围
        /// </summary>
        /// <param name="currentSchoolId"></param>
        /// <param name="inputSchoolIds"></param>
        /// <param name="treeNodeWay"></param>
        /// <returns></returns>
        Task<SchoolDataPermission> GetSchoolDataPermissionAsync(string currentSchoolId = "", string[] inputSchoolIds = null);

        /// <summary>
        /// 获取部门数据范围
        /// </summary>
        /// <param name="treeNodeWay"></param>
        /// <param name="dptType"></param>
        /// <returns></returns>
        Task<DepartmentDataPermission> GetDepartmentDataPermissionAsync( params string[] dptType);

        /// <summary>
        /// 所属人权限
        /// </summary>
        /// <param name="ownerSchoolId"></param>
        /// <returns></returns>
        OwnerDataPermission GetOwnerDataPermission(string ownerSchoolId);


        /// <summary>
        /// 获取项目数据权限范围
        /// </summary>
        /// <returns></returns>
        ProjectDataPermission GetProjectDataPermission();

        /// <summary>
        /// 获取来源数据权限
        /// </summary>
        /// <returns></returns>
        SourceDataPermission GetSourceDataPermission();


        /// <summary>
        /// 客户列使用 特殊权限
        /// </summary>
        /// <param name="currentSchoolId"></param>
        /// <param name="inputSchoolIds"></param>
        /// <param name="inputDepartmentIds"></param>
        /// <returns></returns>
        Task<SpecialDataPermission> GetSpecialDataPermissionAsync(string currentSchoolId = "", string[] inputSchoolIds = null,
            string[] inputDepartmentIds = null);
    }
}
